﻿@using KPIS.GERP.WEB.GIMS
@using KPIS.GERP.Models.ICM
@model KPIS.GERP.Models.ICM.BidderQuotation

@if (ViewContext.RouteData.Values["action"].ToString().ToLower() == "edit")
{
@Html.HiddenFor(model => model.BidderQuoId)
}
@*@Html.HiddenFor(model => model.PrItemId)*@
@Html.HiddenFor(model => model.BidderId)
@Html.HiddenFor(model => model.CreatedBy)
@Html.HiddenFor(model => model.CreatedWhen)
@Html.HiddenFor(model => model.UpdatedBy)
@Html.HiddenFor(model => model.UpdatedWhen)

<div class="clearfix">
<div class="row-fluid">
    <h4 class="text-info">เสนอราคา</h4>
</div>
<div class="row-fluid">
    <div class="control-group">
        <div class="control-label">
            รายการสินค้า/บริการ
        </div>
        <div class="controls" style="padding-top:5px;color:blue">
            @Html.HiddenFor(m => m.PrItemId)
            <span style="color:blue">
                @(
                    (Model.PurchaseRequestItem.HaveItem ?? true) ?
                        Model.PurchaseRequestItem.ResItemId != null ? Model.PurchaseRequestItem.MasResourceItem.Name : Model.PurchaseRequestItem.MasBudgetExpense.Name
                        : "ไม่ระบุพัสดุที่ซื้อ/จ้างทำ"
                )
            </span>
            @Html.ValidationMessageFor(model => model.PrItemId)
        </div>
    </div>
    <div class="control-group">
        <div class="control-label">
            รายละเอียด
        </div>
        <div class="controls">
            @Html.EditorFor(m => m.Descr, "TextArea")
            @Html.ValidationMessageFor(model => model.Descr)
        </div>
    </div>
    <div class="control-group">
        <div class="control-label">
            จำนวน
        </div>
        <div class="controls">
            @Html.TextBoxFor(m => m.Qty, new { @readonly = "readonly", id="Qty" })
        </div>
    </div>
    <div class="control-group">
        <div class="control-label">
            ราคาต่อหน่วย
        </div>
        <div class="controls">
            @Html.EditorFor(m => m.Price, new { id="Price" }) บาท
            @Html.ValidationMessageFor(model => model.Price)
        </div>
    </div>
    <div class="control-group">
        <div class="control-label">
            ราคาไม่รวม Vat
        </div>
        <div class="controls">
            @Html.EditorFor(m => m.ExcludeVatAmount, new { id="ExcludeVatAmount" }) บาท
            @Html.ValidationMessageFor(model => model.ExcludeVatAmount)
        </div>
    </div>
    <div class="control-group">
        <div class="control-label">
            Vat
        </div>
        <div class="controls">
            @Html.EditorFor(m => m.VatAmount, new { id="VatAmount" }) บาท
            @Html.ValidationMessageFor(model => model.VatAmount)
        </div>
    </div>
    <div class="control-group">
        <div class="control-label">
            ส่วนลด
        </div>
        <div class="controls">
            @Html.EditorFor(m => m.DiscountPercent, new { id="DiscountPercent" }) %
            @Html.ValidationMessageFor(model => model.DiscountPercent)
        </div>
    </div>
    <div class="control-group">
        <div class="control-label">
            ส่วนลดพิเศษ
        </div>
        <div class="controls">
            @Html.EditorFor(m => m.ExtraDiscount, new { id="ExtraDiscount" }) บาท
            @Html.ValidationMessageFor(model => model.ExtraDiscount)
        </div>
    </div>
    <div class="control-group">
        <div class="control-label">
            ราคาสุทธิ
        </div>
        <div class="controls">
            @Html.EditorFor(m => m.NetAmount, new { id="NetAmount" }) บาท
            @Html.ValidationMessageFor(model => model.NetAmount)
        </div>
    </div>
    <div class="control-group">
        <div class="control-label">
            หมายเหตุ
        </div>
        <div class="controls">
            @Html.EditorFor(m => m.Remarks, "TextArea")
            @Html.ValidationMessageFor(model => model.Remarks)
        </div>
    </div>
</div>
</div>